package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TrainRecord generated by hbm2java
 */
@Entity
@Table(name = "train_record")
public class TrainRecord implements java.io.Serializable {

	private Long id;
	private UserBaseInfo userBaseInfoByTrainUserId;
	private UserBaseInfo userBaseInfoByPrincipal;
	private String title;
	private String content;
	private Date biginDate;
	private String trainCycle;
	private String trainAgency;
	private int verdict;
	private String certificateUrl;

	public TrainRecord() {
	}

	public TrainRecord(UserBaseInfo userBaseInfoByTrainUserId, int verdict) {
		this.userBaseInfoByTrainUserId = userBaseInfoByTrainUserId;
		this.verdict = verdict;
	}

	public TrainRecord(UserBaseInfo userBaseInfoByTrainUserId,
			UserBaseInfo userBaseInfoByPrincipal, String title, String content,
			Date biginDate, String trainCycle, String trainAgency, int verdict,
			String certificateUrl) {
		this.userBaseInfoByTrainUserId = userBaseInfoByTrainUserId;
		this.userBaseInfoByPrincipal = userBaseInfoByPrincipal;
		this.title = title;
		this.content = content;
		this.biginDate = biginDate;
		this.trainCycle = trainCycle;
		this.trainAgency = trainAgency;
		this.verdict = verdict;
		this.certificateUrl = certificateUrl;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TRAIN_USER_ID", nullable = false)
	public UserBaseInfo getUserBaseInfoByTrainUserId() {
		return this.userBaseInfoByTrainUserId;
	}

	public void setUserBaseInfoByTrainUserId(
			UserBaseInfo userBaseInfoByTrainUserId) {
		this.userBaseInfoByTrainUserId = userBaseInfoByTrainUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PRINCIPAL")
	public UserBaseInfo getUserBaseInfoByPrincipal() {
		return this.userBaseInfoByPrincipal;
	}

	public void setUserBaseInfoByPrincipal(UserBaseInfo userBaseInfoByPrincipal) {
		this.userBaseInfoByPrincipal = userBaseInfoByPrincipal;
	}

	@Column(name = "TITLE", length = 200)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT", length = 65535)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "BIGIN_DATE", length = 19)
	public Date getBiginDate() {
		return this.biginDate;
	}

	public void setBiginDate(Date biginDate) {
		this.biginDate = biginDate;
	}

	@Column(name = "TRAIN_CYCLE", length = 50)
	public String getTrainCycle() {
		return this.trainCycle;
	}

	public void setTrainCycle(String trainCycle) {
		this.trainCycle = trainCycle;
	}

	@Column(name = "TRAIN_AGENCY", length = 200)
	public String getTrainAgency() {
		return this.trainAgency;
	}

	public void setTrainAgency(String trainAgency) {
		this.trainAgency = trainAgency;
	}

	@Column(name = "VERDICT", nullable = false)
	public int getVerdict() {
		return this.verdict;
	}

	public void setVerdict(int verdict) {
		this.verdict = verdict;
	}

	@Column(name = "CERTIFICATE_URL", length = 200)
	public String getCertificateUrl() {
		return this.certificateUrl;
	}

	public void setCertificateUrl(String certificateUrl) {
		this.certificateUrl = certificateUrl;
	}

}
